<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>中国地图</title>
    <script src="./echarts.min.js"></script>
    <script src="./china.js"></script>
</head>

<body>
    <div id="map" style="width: 800px;height:600px;"></div>
    <script>
        const myChart = echarts.init(document.getElementById('map'));
        const option = {
            series: [{
                type: 'map',
                map: 'china',
                roam: true,
                label: {
                    normal: {
                        show: true, // 是否显示对应地名
                        textStyle: {
                            color: "#fff",
                        },
                    },
                },
                itemStyle: {
                    normal: {
                        borderColor: "#293171",
                        borderWidth: "2",
                        areaColor: "#0A0F33",
                    },
                    emphasis: {
                        areaColor: null,
                        shadowOffsetX: 0,
                        shadowOffsetY: 0,
                        shadowBlur: 20,
                        borderWidth: 0,
                        shadowColor: "rgba(0, 0, 0, 0.5)",
                    },
                },
                data: []
            }]
        };
        myChart.setOption(option);
    </script>
</body>

</html>